<?php
require __DIR__.'/lib/User.php';
require __DIR__.'/lib/Article.php';
$pdo = require __DIR__.'/lib/db.php';
//$user = new User($pdo);
//
//$result = $user->login('alan2','123456');
//print_r($result);

$article  = new Article($pdo);
//$result = $article->create('文章标题','文章内容',3);
//$result = $article->view(3);
//$result = $article->edit( 2,'文章标题2','文章内容2',3 );
//print_r($result);

//var_dump($article->delete(1,3));
echo '<pre>';
print_r($article->getList(3));